Ext.namespace("GridBaseStation");

GridBaseStation.Detail = function(plist){
	
	this.parentList = plist;
	
	//网络资源编号
	this.txtNrId = new Ext.form.Hidden({
		name:'nrId'
	});
	this.txtNrType = new Ext.form.Hidden({
		name: 'nrType',
		value: '1'
	});
	//基站编号
	this.txtBsId = new Ext.form.Hidden({
		name:'bsId'
	});
	//基站名称
	this.txtNrName = new Ext.form.TextField({
		fieldLabel : '基站名称',
		name :'nrName',
		width : 200,
		allowBlank : false,
        blankText : '请输入基站名称!',
        maxLength : 50
	});
	//站址
	this.txtNrAddress = new Ext.form.Hidden({
		name : 'nrAddress'
	});
	//路
	this.txtAddressInfoStreet = new Ext.form.TextField({
		fieldLabel : '站址 路',
		name :'addressInfo.street',
		width : 150,
        maxLength : 10
	});
	//弄
	this.txtAddressInfoAlley = new Ext.form.NumberField({
		fieldLabel: '弄',
		name :'addressInfo.alley',
		width: 60,
        maxLength : 10
	});
	//号
	this.txtAddressInfoDoorNum = new Ext.form.NumberField({
		fieldLabel: '号',
		name :'addressInfo.doorNum',
		width: 60,
        maxLength : 10
	});
	//楼名
	this.txtAddressInfoBuildingName = new Ext.form.TextField({
		fieldLabel : '楼宇名称',
		name :'addressInfo.buildingName',
		width : 150,
        maxLength : 10
	});
	//楼层
	this.txtAddressInfoFloor = new Ext.form.NumberField({
		fieldLabel: '楼层',
		name :'addressInfo.floor',
		width: 60,
        maxLength : 10
	});
	//位置描述
	this.txtLocationDesc = new Ext.form.TextArea({
		fieldLabel : '基站位置描述',
		name :'locationDesc',
		width : 400,
        maxLength : 500
	});
	//类型
	this.cmbBsType = new Ext.form.ComboBox({
		width : 120,
        fieldLabel : '基站类型',
//        hiddenName : 'addressInfo.province',
        store: OMS.GRID_NETRS_TYPE,
        typeAhead:true,
        mode: 'local',
        triggerAction: 'all',
        selectOnFocus: true	
	});
	//G网站号
	this.txtGnetSn = new Ext.form.TextField({
		fieldLabel : 'G网站号',
		name : 'gnetSn',
		width : 150,
        maxLength : 20
	});
	//D网站号
	this.txtDnetSn = new Ext.form.TextField({
		fieldLabel : 'D网站号',
		name : 'dnetSn',
		width : 150,
        maxLength : 20
	});
	//TD站型
	this.txtTdType = new Ext.form.TextField({
		fieldLabel : 'TD站型',
		name :'tdType',
		width : 150,
        maxLength : 20
	});
	//钥匙类型
	this.cmbKeyType = new Ext.form.ComboBox({
		width : 120,
        fieldLabel : '钥匙类型',
        store: OMS.GRID_KEY_TYPE,
        typeAhead:true,
        mode: 'local',
        triggerAction: 'all',
        selectOnFocus: true	
	});
	//机房属性
    this.txtMachineRoomAttribute = new Ext.form.TextField({
		fieldLabel : '机房属性',
		name : 'machineRoomAttribute',
		width : 150,
        maxLength : 100
	});
	//机房位置
    this.txtMachineRoomPosition = new Ext.form.TextField({
		fieldLabel : '机房位置',
		name : 'machineRoomPosition',
		width : 120,
        maxLength : 100
	});
	//用电属性
    this.cmbElectricAttribute = new Ext.form.ComboBox({
		width : 120,
        fieldLabel : '用电属性',
//        hiddenName : 'electricAttribute',
        store: OMS.GRID_ELECTRIC_ATTRIBUTE,
        typeAhead:true,
        mode: 'local',
        triggerAction: 'all',
        selectOnFocus: true	
	});
	//配电房位置
    this.txtElectricalRoomPosition = new Ext.form.TextField({
		fieldLabel : '配电房位置',
		name : 'electricalRoomPosition',
		width : 120,
        maxLength : 10
	});
	//配电房联系人（如果是业主供电写明配电房位置和联系人）
	this.txtElectricalRoomContact = new Ext.form.Hidden({
		name:'erContactInfo.contactId'
	});	
	//配电房联系名称
	this.txtErContactName = new Ext.form.TextField({
		fieldLabel : '配电房联系人',
		name : 'erContactInfo.userName',
		width : 120,
        maxLength : 25
	});	
	//配电房联系人电话
    this.txtErContactPhone = new Ext.form.TextField({
		fieldLabel : '联系电话',
		name : 'erContactInfo.phoneNumOffice',
		width : 120,
        maxLength : 15
	});
	//供电杆路号（供电局供电的需要填写）
    this.txtElectricPoleCode = new Ext.form.TextField({
		fieldLabel : '供电杆路号',
		name : 'electricPoleCode',
		width : 120,
        maxLength : 25
	});
    //业主联系人（白天）
	this.txtDayContact = new Ext.form.Hidden({
		name:'dayContactInfo.contactId'
	});	
	this.txtDayContactName = new Ext.form.TextField({
		fieldLabel : '业主联系人（白天）',
		name : 'dayContactInfo.userName',
		width : 120,
        maxLength : 25
	});	
    this.txtDayContactPhone = new Ext.form.TextField({
		fieldLabel : '联系电话',
		name : 'dayContactInfo.phoneNumOffice',
		width : 120,
        maxLength : 15
	});
	
    //业主联系人（夜间）
	this.txtNightContact = new Ext.form.Hidden({
		name:'nightContactInfo.contactId'
	});	
	this.txtNightContactName = new Ext.form.TextField({
		fieldLabel : '业主联系人（夜间）',
		name : 'nightContactInfo.userName',
		width : 120,
        maxLength : 25
	});	
    this.txtNightContactPhone = new Ext.form.TextField({
		fieldLabel : '联系电话',
		name : 'nightContactInfo.phoneNumOffice',
		width : 120,
        maxLength : 15
	});
	
    //业主联系人（节假日）
	this.txtHolidayContact = new Ext.form.Hidden({
		name:'holidayContactInfo.contactId'
	});	
	this.txtHolidayContactName = new Ext.form.TextField({
		fieldLabel : '业主联系人（节假日）',
		name : 'holidayContactInfo.userName',
		width : 120,
        maxLength : 25
	});	
    this.txtHolidayContactPhone = new Ext.form.TextField({
		fieldLabel : '联系电话',
		name : 'holidayContactInfo.phoneNumOffice',
		width : 120,
        maxLength : 15
	});
	 //备注
	this.txtRemark = new Ext.form.TextArea({
		fieldLabel : '备注',
		name :'remark',
		width : 400,
        maxLength : 1000
	});
	
	//基本信息
	this.form = new Ext.form.FormPanel({
		bodyStyle : 'padding: 5px 5px 0',
		frame :true,
//		fileUpload: true, 
		autoScroll : true,
		//autoHeight : true,
		height: 390,
		width : 700,
		labelAlign: 'right',
		labelWidth : 120,
		layout : 'table',
		layoutConfig : {columns:2},
		items:[
			{colspan:2,layout:'form',items:[this.txtNrId,this.txtNrType,this.txtBsId,this.txtNrName]},
			{colspan:2,layout:'form',items:[this.txtNrAddress,this.txtAddressInfoStreet,this.txtAddressInfoAlley,
				this.txtAddressInfoDoorNum,this.txtAddressInfoBuildingName,this.txtAddressInfoFloor]},
			{colspan:2,layout:'form',items:[this.txtLocationDesc]},
			{layout:'form', items:[this.cmbBsType]},
            {layout:'form', items:[this.txtTdType]},
            {layout:'form', items:[this.txtGnetSn]},
            {layout:'form', items:[this.txtDnetSn]},
            {colspan:1,layout:'form',items:[this.txtMachineRoomAttribute]},
            {colspan:1,layout:'form',items:[this.txtMachineRoomPosition]},
            {colspan:1,layout:'form',items:[this.cmbElectricAttribute]},
            {colspan:1,layout:'form',items:[this.txtElectricalRoomPosition]},
            {layout:'form', items:[this.txtElectricalRoomContact,this.txtErContactName]},
            {layout:'form', items:[this.txtErContactPhone]},
            {colspan:1,layout:'form',items:[this.txtElectricPoleCode]},
            {colspan:1,layout:'form',items:[this.cmbKeyType]},
            {layout:'form', items:[this.txtDayContact,this.txtDayContactName]},
            {layout:'form', items:[this.txtDayContactPhone]},
            {layout:'form', items:[this.txtNightContact,this.txtNightContactName]},
            {layout:'form', items:[this.txtNightContactPhone]},
            {layout:'form', items:[this.txtHolidayContact,this.txtHolidayContactName]},
            {layout:'form', items:[this.txtHolidayContactPhone]},
            {colspan:2,layout:'form', items:[this.txtRemark]}
		]
	});
	
	//GIS信息
	this.txtGisId = new Ext.form.Hidden({
		name: 'gisInfo.id'
	});	
	this.txtGisType = new Ext.form.Hidden({
		name: 'gisInfo.type',
		value: 2
	});	
	/*//片区属地
	this.cmbDistrict = new Ext.form.ComboBox({
        width: 150,
        listWidth : 167,
        fieldLabel: '片区属地',
        name : 'distId',
        store : new Ext.data.JsonStore({
		   url:"../gridareas/listAllDistricts.form",
		   autoLoad : true,
		   root:"districts",
		   fields:["areaId","name"]
		}),
		valueField : 'areaId',
		displayField :'name',
        mode: 'local',
        //typeAhead:true,
        emptyText:'------请选择------',
        triggerAction: 'all',
        selectOnFocus: true
    });*/
    //网络资源经度 
    this.txtAddressInfoLongitude = new Ext.form.TextField({
    	fieldLabel : '经度',
    	name : 'addressInfo.longitude',
		width : 150,
        maxLength : 20
    });
    //网络资源纬度
    this.txtAddressInfoLatitude = new Ext.form.TextField({
    	fieldLabel : '纬度',
    	name : 'addressInfo.latitude',
		width : 150,
        maxLength : 20
    });
    //图标ID
    this.txtGisIconId = new Ext.form.Hidden({
    	name: 'gisInfo.iconId'
    });
    //绘制基站
    this.btnDrawGis = new Ext.Button({
        text: '绘制基站',
        tooltip: {text: '绘制基站'},
        handler: this.viewGis,
        scope: this
    });
    
    //GIS信息--FormPanel
    this.gisform = new Ext.form.FormPanel({
		bodyStyle : 'padding: 5px 5px 0',
		frame :true,
		//autoHeight : true,
		height:420,
		width : 700,
		labelAlign: 'right',
		labelWidth : 120,
		layout : 'table',
		layoutConfig : {columns:2},
		items:[
			//{colspan:2,layout:'form',items:[this.cmbDistrict]},
			{layout:'form', items:[this.txtAddressInfoLongitude]},
            {layout:'form', items:[this.txtAddressInfoLatitude]},
            {layout:'form', items:[this.txtGisIconId,this.txtGisId]},
            {colspan:2,layout:'form', items:[this.btnDrawGis]}
		]
	});
    
    ////设备信息
	//是否有油机转换箱
	this.cmbHasConversionBox = new Ext.form.ComboBox({
        width: 120,
        fieldLabel: '是否有油机转换箱',
        store: OMS.GRIDBUILDING_YESNO,
        typeAhead:true,
        mode: 'local',
        emptyText:'',
        triggerAction: 'all',
        selectOnFocus: true
    });
	//油机车可否进入
	this.cmbCanEnterOilcar = new Ext.form.ComboBox({
        width: 120,
        fieldLabel: '油机车可否进入',
        store: OMS.GRIDBUILDING_YESNO,
        typeAhead:true,
        mode: 'local',
        emptyText:'',
        triggerAction: 'all',
        selectOnFocus: true
    });
	 //空调情况（型号和数量）
	this.txtAirconditionDesc = new Ext.form.TextArea({
		fieldLabel : '空调情况',
		name :'airconditionDesc',
		width : 400,
        maxLength : 100
	});
    //蓄电池情况（型号和数量）
	this.txtAccumulatorDesc = new Ext.form.TextArea({
		fieldLabel : '蓄电池情况',
		name :'accumulatorDesc',
		width : 400,
        maxLength : 100
	});
	//电流数
	this.txtElectricCurrentDesc = new Ext.form.TextField({
		fieldLabel : '电流数',
		name : 'electricCurrentDesc',
		width : 120,
        maxLength : 10
	});
	//包机维护责任人
	this.txtMaintenanceContact = new Ext.form.Hidden({
		name:'maintenanceContactInfo.contactId'
	});	
	this.txtMaintenanceContactName = new Ext.form.TextField({
		fieldLabel : '包机维护责任人',
		name : 'maintenanceContactInfo.userName',
		width : 120,
        maxLength : 25
	});	
    this.txtMaintenanceContactPhone = new Ext.form.TextField({
		fieldLabel : '联系电话',
		name : 'maintenanceContactInfo.phoneNumOffice',
		width : 120,
        maxLength : 15
	});
	//集成商名称
	this.txtIntegrator = new Ext.form.TextField({
		fieldLabel : '集成商名称',
		name : 'integrator',
		width : 120,
        maxLength : 25
	});
	//是否有近端机
	this.cmbHasLocalMachine = new Ext.form.ComboBox({
        width: 120,
        fieldLabel: '是否有近端机',
        store: OMS.GRIDBUILDING_YESNO,
        typeAhead:true,
        mode: 'local',
        emptyText:'',
        triggerAction: 'all',
        selectOnFocus: true
    });
     //近端机位置和型号
	this.txtLocalMachineDesc = new Ext.form.TextArea({
		fieldLabel : '近端机位置和型号',
		name :'localMachineDesc',
		width : 400,
        maxLength : 100
	});
	//是否有远端机
	this.cmbHasRemoteMachine = new Ext.form.ComboBox({
        width: 120,
        fieldLabel: '是否有远端机',
        store: OMS.GRIDBUILDING_YESNO,
        typeAhead:true,
        mode: 'local',
        emptyText:'',
        triggerAction: 'all',
        selectOnFocus: true
    });
     //近端机位置和型号
	this.txtRemoteMachineDesc = new Ext.form.TextArea({
		fieldLabel : '远端机位置和型号',
		name :'remoteMachineDesc',
		width : 400,
        maxLength : 100
	});
	 //整流器型号/模块数量
	this.txtRectifierDesc = new Ext.form.TextArea({
		fieldLabel : '整流器型号/模块数量',
		name :'rectifierDesc',
		width : 400,
        maxLength : 100
	});
    
    //设备信息--FormPanel	
     this.equipmentform = new Ext.form.FormPanel({
		bodyStyle : 'padding: 15px 15px 10',
		frame :true,
		autoScroll : true,
		//autoHeight : true,
		height:390,
		align:'center',
		width : 700,
		labelAlign: 'right',
		labelWidth : 140,
		layout : 'table',
		layoutConfig : {columns:2},
		items:[
		{colspan:1,layout:'form', items:[this.cmbHasConversionBox]},
		{colspan:1,layout:'form', items:[this.cmbCanEnterOilcar]},
		{colspan:2,layout:'form', items:[this.txtAirconditionDesc]},
		{colspan:2,layout:'form', items:[this.txtAccumulatorDesc]},
		{colspan:1,layout:'form', items:[this.txtElectricCurrentDesc]},
		{colspan:1,layout:'form', items:[this.txtIntegrator]},
		{colspan:1,layout:'form', items:[this.txtMaintenanceContactName]},
		{colspan:1,layout:'form', items:[this.txtMaintenanceContactPhone]},
		{colspan:2,layout:'form', items:[this.cmbHasLocalMachine]},
		{colspan:2,layout:'form', items:[this.txtLocalMachineDesc]},
		{colspan:2,layout:'form', items:[this.cmbHasRemoteMachine]},
		{colspan:2,layout:'form', items:[this.txtRemoteMachineDesc]},
		{colspan:2,layout:'form', items:[this.txtRectifierDesc]}
		]
	});
	
	 this.tabs = new Ext.TabPanel({
        width:700,
        activeTab: 0,
        frame:true,
        //autoHeight:true,
        height : 420,
        deferredRender:false, 
		layoutOnTabChange:true,		
        items:[
            {items:this.form, title: '基本信息'},
            {items:this.gisform, title: 'Gis信息'},
            {items:this.equipmentform,title:'设备信息'}
        ]
    });
    
	GridBaseStation.Detail.superclass.constructor.call(this,{
		title : '基站信息',
		bodyStyle: 'padding: 5px 5px 0',
        autoHeight: true,
        width: 730,
        resizable: false,
        plain: true,
        modal: true,
        autoScroll: true,
        closeAction: 'hide',
        //items: [[this.form],[this.gisform]],
        items :[this.tabs],
        buttons: [{
            text: '保存',
            cls: 'x-btn-text-icon btn-save',
            handler: this.onSave,
            scope: this
        }, {
            text: '关闭',
            cls: 'x-btn-text-icon btn-cancel',
            handler: this.hide.createDelegate(this, [])
        }]
		
	});
};

Ext.extend(GridBaseStation.Detail,Ext.Window,{

	initData : function(id) {
			this.form.getForm().reset();
			this.gisform.getForm().reset();
			this.equipmentform.getForm().reset();
			var connection = new Ext.data.Connection({
						url : '../gridnetworkresource/prepare.form?timesnap=' + Date.parse(new Date()),
						method : 'POST'
					});
			if(id!=null){
				Utils.request(connection, {
						params : {
							nrId : id
						},
						scope : this,
						success : function(resp, action) {
							var nr = resp.gridNetworkResource;
							var bs = resp.gridBaseStation;
							var add = resp.addressInfo;
							var gis = resp.gisInfo;
							var ec = resp.erContactInfo;
							var dc = resp.dayContactInfo;
							var nc = resp.nightContactInfo;
							var hc = resp.holidayContactInfo;
							var mc = resp.maintenanceContactInfo;
							//console.info(obj);							
							//网络资源名称
							this.scope.txtNrId.setValue(nr.nrId);
							this.scope.txtNrName.setValue(nr.nrName);
							this.scope.txtBsId.setValue(bs.bsId);
							this.scope.txtNrAddress.setValue(nr.nrAddress);
							if(add){
							this.scope.txtAddressInfoStreet.setValue(add.street);
							this.scope.txtAddressInfoAlley.setValue(add.alley);
							this.scope.txtAddressInfoDoorNum.setValue(add.doorNum);
							this.scope.txtAddressInfoBuildingName.setValue(add.buildingName);
							this.scope.txtAddressInfoFloor.setValue(add.floor);
							}
							this.scope.txtLocationDesc.setValue(nr.locationDesc);
							this.scope.cmbBsType.setValue(bs.bsType);
							this.scope.txtGnetSn.setValue(bs.gnetSn);
							this.scope.txtDnetSn.setValue(bs.dnetSn);
							this.scope.txtTdType.setValue(bs.tdType);
							this.scope.cmbKeyType.setValue(bs.keyType);
							this.scope.txtMachineRoomAttribute.setValue(bs.machineRoomAttribute);
							this.scope.txtMachineRoomPosition.setValue(bs.machineRoomPosition);
							this.scope.cmbElectricAttribute.setValue(bs.electricAttribute);
							this.scope.txtElectricalRoomPosition.setValue(bs.electricalRoomPosition);
							if(ec){
							this.scope.txtElectricalRoomContact.setValue(ec.contactId);
							this.scope.txtErContactName.setValue(ec.userName);
							this.scope.txtErContactPhone.setValue(ec.phoneNumOffice);
							}
							this.scope.txtElectricPoleCode.setValue(bs.electricPoleCode);
							if(dc){
							this.scope.txtDayContact.setValue(dc.contactId);
							this.scope.txtDayContactName.setValue(dc.userName);
							this.scope.txtDayContactPhone.setValue(dc.phoneNumOffice);
							}
							if(nc){
							this.scope.txtNightContact.setValue(nc.contactId);
							this.scope.txtNightContactName.setValue(nc.userName);
							this.scope.txtNightContactPhone.setValue(nc.phoneNumOffice);
							}
							if(hc){
							this.scope.txtHolidayContact.setValue(hc.contactId);
							this.scope.txtHolidayContactName.setValue(hc.userName);
							this.scope.txtHolidayContactPhone.setValue(hc.phoneNumOffice);
							}
							this.scope.txtRemark.setValue(bs.remark);
							
							//this.scope.cmbDistrict.setValue(nr.distId);
							this.scope.txtAddressInfoLongitude.setValue(add.longitude);
							this.scope.txtAddressInfoLatitude.setValue(add.latitude);
							this.scope.txtGisId.setValue(gis.id);
							this.scope.txtGisIconId.setValue(gis.iconId);
							var namePos = gis.namePos;
							if(namePos!=null && namePos!=""){
								var vv = namePos.split(",");
								if(vv.length==2){
									//经度
									this.scope.txtAddressInfoLongitude.setValue(vv[0]);
									//纬度
									this.scope.txtAddressInfoLatitude.setValue(vv[1]);
								}
							}
							
							this.scope.cmbHasConversionBox.setValue(bs.hasConversionBox);
							this.scope.cmbCanEnterOilcar.setValue(bs.canEnterOilcar);
							this.scope.txtAirconditionDesc.setValue(bs.airconditionDesc);
							this.scope.txtAccumulatorDesc.setValue(bs.accumulatorDesc);
							this.scope.txtElectricCurrentDesc.setValue(bs.electricCurrentDesc);
							this.scope.txtMaintenanceContact.setValue(mc.contactId);
							this.scope.txtMaintenanceContactName.setValue(mc.userName);
							this.scope.txtMaintenanceContactPhone.setValue(mc.phoneNumOffice);
							this.scope.txtIntegrator.setValue(bs.integrator);
							this.scope.cmbHasLocalMachine.setValue(bs.hasLocalMachine);
							this.scope.txtLocalMachineDesc.setValue(bs.localMachineDesc);
							this.scope.cmbHasRemoteMachine.setValue(bs.hasRemoteMachine);
							this.scope.txtRemoteMachineDesc.setValue(bs.remoteMachineDesc);
							this.scope.txtRectifierDesc.setValue(bs.rectifierDesc);
						}
					});
			}
		},
		onSave: function(btn, event) {
			var basicForm =this.form.getForm();
			if (!basicForm.isValid()) {
				return;
			}
			//btn.disabled = true; 
			basicForm.doAction('submit', { 
				method : 'post',
				url : '../gridnetworkresource/save.form', 
				params: {
					'bsType' :this.cmbBsType.getValue(),
					'keyType' :this.cmbKeyType.getValue(),
					//'distId':this.cmbDistrict.getValue(),
					'electricAttribute':this.cmbElectricAttribute.getValue(),
					'addressInfo.longitude':this.txtAddressInfoLongitude.getValue(),
					'addressInfo.latitude':this.txtAddressInfoLatitude.getValue(),
					'gisInfo.id': this.txtGisId.getValue(),
					'gisInfo.type':this.txtGisType.getValue(),
					'gisInfo.iconId':this.txtGisIconId.getValue(),
					'hasConversionBox':this.cmbHasConversionBox.getValue(),
					'canEnterOilcar':this.cmbCanEnterOilcar.getValue(),
					'airconditionDesc':this.txtAirconditionDesc.getValue(),
					'accumulatorDesc':this.txtAccumulatorDesc.getValue(),
					'electricCurrentDesc':this.txtElectricCurrentDesc.getValue(),
					'maintenanceContactInfo.contactId':this.txtMaintenanceContact.getValue(),
					'maintenanceContactInfo.userName':this.txtMaintenanceContactName.getValue(),
					'maintenanceContactInfo.phoneNumOffice':this.txtMaintenanceContactPhone.getValue(),
					'integrator':this.txtIntegrator.getValue(),
					'hasLocalMachine':this.cmbHasLocalMachine.getValue(),
					'localMachineDesc':this.txtLocalMachineDesc.getValue(),
					'hasRemoteMachine':this.cmbHasRemoteMachine.getValue(),
					'remoteMachineDesc':this.txtRemoteMachineDesc.getValue(),
					'rectifierDesc':this.txtRectifierDesc.getValue()
				},
				scope: this,
				success: function(form, action) {
//					console.info(this);
					this.parentList.update();
					this.hide();
				}
			});
	},
		
	initGis:function(name, iconId, coordx, coordy){
		this.txtAddressInfoLongitude.setValue(coordx);
		this.txtAddressInfoLatitude.setValue(coordy);
		this.txtGisIconId.setValue(iconId);
	},
	viewGis:function(){
		var did = this.txtNrId.getValue();
		/*if(did==''){
			Utils.warn('请先选择片区！');
			return;
		}*/
		var name = this.txtNrName.getValue();
		var iconId = this.txtGisIconId.getValue();
		if(iconId==''){
			iconId = 503;
		}
		var coordx = this.txtAddressInfoLongitude.getValue();
		var coordy = this.txtAddressInfoLatitude.getValue();
		var str = OMS.GIS_IP+'/gis_for_management.jsp?did=' + did + '&iconId=' + iconId + '&coordx=' +coordx+ '&coordy='+ coordy + '&layerType=3'+'&name=' + name;
		window.open(encodeURI(str), '_blank', 'toolbar=no,location=no,directories=no,scrollbars=no,menubar=no,width=1000,height=600,resizable=no,left=0,top=0, status=no');	
	}
});

